﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZR.ServiceCore.Attributes
{
    [AttributeUsage(AttributeTargets.Class,AllowMultiple =true)]
    public class ModuleInfoAttribute : Attribute
    {
        /// <summary>
        /// 模块名
        /// </summary>
        public string ModuleName { get; private set; }

        /// <summary>
        /// 模块编码
        /// </summary>
        public string ModuleCode { get; private set; }


        /// <summary>
        /// 上级模块类型
        /// </summary>
        public Type PaModuleType { get; private set; }


        /// <summary>
        /// 
        /// </summary>
        /// <param name="paModuleType">上级模块类型</param>
        /// <param name="moduleName">模块名</param>
        /// <param name="moduleCode">模块编码</param>
        public ModuleInfoAttribute(Type paModuleType, string moduleName, string moduleCode = null)
        {
            this.PaModuleType = paModuleType;
            this.ModuleName = moduleName;
            this.ModuleCode=moduleCode;
        }
    }

}
